═══ 1. Help for TIME868 Version 5 ═══ Use TIME868 to set your system clock using the Time Protocol. This protocol is accurate to plus or minus one second. A variety of features support several modes of operation for both permanent and dial-up access to time servers. TIME868 also operates as a Time Server for redistribution of accurate time to local clients. TIME868 provides a graph of the adjustments made for visual reference. Related Information:  Choosing a time server  Setting up the program  TZenvironment variable  Dialog fields  Providing a time server  USNO time server  National Institute of Standards and Technology  About the Time Protocol  Registering  Changes in Version 2 (b)  Changes in Version 3 (c)  Changes in Version 4 (c)  Changes in Version 5 (c) Copyright 1995,1996 Norbert Dey ═══ 2. Choosing a time server ═══ The basic reason for synchronizing your computer's clock is so that your value for a particular increment of time is the same or very close to the value used by your colleagues. You have two basic choices: everyone can synchronize to the same clock or everyone can synchronize to one of several standard clocks. If you have no need for the exact standard value for the time, everyone simply can synchronize to a conveniently available clock. In many applications, only a comparison of times is necessary ... this file was created after that file ... and so forth. As long as the clock is accurate to ordinary human standards (a minute or so), this is sufficient. If it is impractical for all of your colleagues to synchronize to the same clock, you will need to find a server which itself is traceable to a precise standard clock. Some Internet service providers and larger institutions will provide time service which is synchronized to a standard time source. If you have a local source of accurate time, it is your best choice for a time server. All of the servers listed by this program are Stratum 2 or better in NTP terms. This means that they are normally very good clocks. (Sometimes they may have problems and drift off. A suspicious time should be checked against another server.) Not all of the servers listed provide service on both TCP and UDP protocols. If one protocol does not work, try the other. If both are provided, UDP will generally give the best results. Another factor in the choice is the distance to the server in network time. A server with a long delay will give poorer results than a server with a short delay. Long delays are perhaps due to network congestion over that route and therefore will be quite variable. Since the time value returned by the server is the time at which the packet left the server, its accuracy depends on a quick trip to your system. The network latency is reported in the log. This is calculated as 1/2 of the total round trip on the assumption that the delay is symmetrical. The latency is taken into account when computing the variance. A useful comparison is the difference between the latency of the selected server and your Internet provider or gateway. I typically get 74ms latencies to my service provider over a 28.8 modem. If you are operating through a firewall, your firewall system itself may be the only outside time source, even if you have limited access to other services. ═══ 3. Help for TZ Variable ═══ The TZ variable is set by a line in the config.sys file. This information corresponds to the IBM definition for the TZ variable in OS/2. If you are in the continental USA, use one of these:  set TZ=PST8PDT  set TZ=MST7MDT  set TZ=CST6CDT  set TZ=EST5EDT  set TZ=AST4ADT Some other countries for examples:  Israel: set TZ=IST-2IDT,4,3,6,3600,10,1,6,7200,3600  Italy: set TZ=CET-1CDT,3,-1,0,7200,10,-1,0,10800,3600  Newfoundland: set TZ=NST3:30NDT  New Zealand: set TZ=NZS12NZD,9,4,0,3600,3,4,0,7600,3600  Peru: set TZ=EST5EST,1,0,0,3600,2,0,0,3600,0  Singapore: set TZ=SST-8SST,1,1,1,0,1,1,1,0,0 Some countries and parts of the USA do not change time during the summer. For these, use the following form: set TZ=AAAOAAA,1,1,1,0,1,1,1,0,0 where AAA is the name of the time zone (MST for Mountain Standard Time, CST for Central Standard Time, SST for Singapore Standard Time) and O is the offset from UTC/GMT. Otherwise you can construct your own TZ variable from the following information. The string is composed of 10 parameters, separated by commas. The first parameter is SSSnDDD where SSS is a 3-character label for standard (winter) time. This is usually all letters, but can contain digits and blanks after the first character. DDD is a corresponding label for daylight savings time (summer time). The n between the SSS and DDD is the number of hours UTC is different from your local time (UTC - local time). Use +n or -n as appropriate. If your local time zone is not an even number of hours from UTC, you may use the form [+/-]hh:mm:ss. For example, PST+8:00:00PDT. Warning, this extended form was first introduced in CSD10 for the IBM C compiler in August 1994 (see APAR PJ14456). Other programs linked before CSD10 may not recognize this form. The remaining parameters deal with the dates and times when the change is made to summer time and back to winter time. If your time changes follow the USA rules, then you do not need to supply the remainder of the parameters. Otherwise you need to supply them all. If only a portion of the additional parameters are supplied, the whole set will be ignored and they will appear to be totally ineffective. Parameters 2-5 describe the start of summer time. Parameter 2 The starting month of summer time (1-12). Parameter 3 The starting week of summer time according to the following list:  1 - the first week of the month  2 - the second week of the month  3 - the third week of the month  4 - the fourth week of the month  0 - the change occurs on a specific day of the month  -1 - the last week of the month  -2 - the next to last week of the month  -3 - the second to last week of the month  -4 - the third to last week of the month Parameter 4 The starting day of summer time. The day of the month (1-31) if parameter 3 was 0, otherwise the day of the week (0-6). Parameter 5 The starting time-of-day (local time) in seconds. (3600 seconds is 1AM.) Parameters 6-9 describe the end of summer time. Parameter 6 The starting month of winter time. Parameter 7 The starting week of winter time (coded like parameter 3.) Parameter 8 The starting day of winter time. The day of the month (1-31) if parameter 7 was 0, otherwise the day of the week (0-6). Parameter 9 The starting time-of-day (local summer time) in seconds. (7200 seconds is 2AM.) Parameter 10 The final parameter specifies the amount of time shift in seconds (3600 = 1 hour.) For example, I could use: set TZ=PST+8PDT,4,1,0,3600,10,-1,0,7200,3600 In ordinary language, this reads as: Winter time is called 'PST' and summer time is called 'PDT'. I am 8 hours West of the zero meridian. Summer time starts on the first Sunday of April at 0100 local time. Summer time ends on the last Sunday of October at 0200 local time. When summer time is in effect, one hour (3600 seconds) is added to local time. Note:EMX-based programs have a different format for the TZ variable. If you use EMX programs, you can set that variable with the name EMXTZ. If the variable EMXTZ is available, the EMX programs will use it in preference to the TZ variable. ═══ 4. Help for dialog fields ═══ The following panels describe the dialog fields. Site selection Hostname of reference server IP address of server TCP Protocol support UDP Protocol support Log text window Graph of history Delay for Auto-run Interval between samples Run button Help button Auto-run feature Continuous running TZ environment variable Current site Change the name Retry count Log activity to a file Log file name Server enable for UDP Log Clients by IP (and name) Start Minimized Persistent retry ═══ 4.1. Help for Well-known sites ═══ This list contains several well-known sites providing time service plus two customizable entries. The list of sites is abstracted from http://www.eecis.udel.edu/~mills/ntp/clock2.html The sites selected for inclusion here are all Stratum 2 (not Stratum 1) and are listed as open access. If you would like to use one of these sites on a regular basis, it would be gracious of you to download the clock.txt file for the latest status and to observe also the access policy listed. In most cases, your local network or your service provider will already have a sufficiently accurate clock for regular use. ═══ 4.2. Help for Hostname ═══ Enter the hostname here. Use the full name, such as tick.usno.navy.mil. If the IP address is specified, then this field need not be used. ═══ 4.3. Help for IP address ═══ If the IP address is known, enter it here. If there are any characters in this field, the program will try to use this as an IP address. If you don't know (or are unsure of) the IP address, just leave it blank and the program will consult the nameserver. The IP address found will be stored for the next use. ═══ 4.4. Help for TCP radio button ═══ If the site provides the Time service via TCP, check this button. If you are uncertain, just give it a try. If the service is not provided, the request will time out in a few seconds. ═══ 4.5. Help for UDP radio button ═══ If the site provides the Time service via UDP, check this button. If you are uncertain, just give it a try. If the service is not provided, the request will time out in a few seconds. If both TCP and UDP are available, UDP may give slightly better results due to the simpler operation. ═══ 4.6. Help for log ═══ The log is a record of the actions taken when processing a request for the time. It also records any errors encountered. The window will store about 2,000 characters of history. If more is needed, you may need to log to a file. ═══ 4.7. Help for graph ═══ The graph records the last 20 results for this server. Each server is recorded separately. The horizontal black line is the local notion of UTC. The green band across the center of the graph indicates the span of plus and minus 1 second from local UTC. The horizontal scale is the time from the first of the 20 samples to the last. Samples taken closely together in time will appear close together on the graph. The blue line indicates the amount of adjustment necessary to the local clock. A value above the center line indicates that the local clock was ahead, while below indicates the clock was behind. If everything is working well, the blue line will stay within the green band once the initial correction is made. If the blue line is consistantly above the green band, then your clock is running fast. If it is consistently below the green band, then it is running slow. The red line above the center line is the latency of the time request. This is one-half the total time for the request. It should normally be in the green band unless the network is very busy or the time server was swapped out on the server machine. ═══ 4.8. Help for delay ═══ When Auto-run is selected, the program will wait this number of seconds before taking the sample. The minimum value is 5 seconds to allow time for the user to cancel the Auto-run. The Auto-run may be cancelled by deselecting the check-box. ═══ 4.9. Help for interval ═══ When continuous run is selected, the program will check the time at this interval. The minimum value is 1 hour. There is no value in checking more often than this. In fact, there is often little to be gained by checking more than once per day. This minimum also prevents a bombardment of the server with requests. ═══ 4.10. Help for Run ═══ Pressing this button will check the time immediately. ═══ 4.11. Help for Help ═══ Select the above menu item Help to use the Help Index, General Help or to get basic information on how to use Help. Select for General Help. ═══ 4.12. Help for Auto-run ═══ When this is selected, the program will automatically check the time after a short delay. If continuous running or server enable are not selected, the program will exit. ═══ 4.13. Help for Continuous ═══ When this is selected, the program will check the time each interval. ═══ 4.14. Help for Current Site Name ═══ The field contains an editable copy of the currently selected site name. Changes to the name will show in the list the next time the program is loaded. ═══ 4.15. Help for Retry Count ═══ Use this field to set the number of tries before giving up. ═══ 4.16. Help for Logging ═══ Check this box if you wish the activity to be logged to a file. Each time the program runs, information is added to the file. Over time, the file can get quite large, so check the file size from time to time if you are using this feature. The logging of server start and stop are also controlled here. ═══ 4.17. Help for Log file name ═══ This field sets the file name to be used for the log file. Each site can have a different log file. Server activity is logged to the current file. ═══ 4.18. Help for Server enable ═══ Check this box to enable the UDP Time Server. This will enable the program to provide time service to other systems. The most common use will be to have a designated system get the time from an outside source over the Internet (or other TCP/IP) network and then redistribute the time to clients on the local area network. Even in the absence of an outside reference, the systems on a local network can be kept in close synchronization. When enabled, the server is started as soon as the program is started and remains running as long as the program does. The selection of server enable prevents the program from automatically shutting down after an Auto-Run. It is recommended that Auto-Run be enabled to sync the server with the reference source on starting and that Continuous be enabled to keep the server on time. Deselecting this box will stop the server within a few seconds. ═══ 4.19. Help for Log clients ═══ Check this box if you need to see which clients are requesting time service. The IP address of the client is provided, along with the name of the client if it is available. Client logging can reduce the throughput and responsiveness of the server if there are a large number of clients. It is recommended that this feature be used for service and then disabled when not in active use. ═══ 4.20. Help for Start minimized. ═══ Check this box if you would like the program to start in a minimized state. You will probably check this box after you are comfortable with the reliability and features of the program. While minimized, the program continues to operate normally. You can maximize the program by selecting it from the window list or clicking on the icon in the Minimized Window Viewer or on the Desktop (depending on where you minimize things.) ═══ 4.21. Help for Persistant retry. ═══ When this box is checked, the program will persistently try to obtain a sample until it is successful. ═══ 5. Other Information ═══  About the Time Protocol  USNO time server  National Institute of Standards and Technology  UTC ═══ 5.1. Time Protocol ═══ Network Working Group Request for Comments: 868 J. Postel - ISI K. Harrenstien - SRI May 1983 Time Protocol This RFC specifies a standard for the ARPA Internet community. Hosts on the ARPA Internet that choose to implement a Time Protocol are expected to adopt and implement this standard. This protocol provides a site-independent, machine readable date and time. The Time service sends back to the originating source the time in seconds since midnight on January first 1900. One motivation arises from the fact that not all systems have a date/time clock, and all are subject to occasional human or machine error. The use of time-servers makes it possible to quickly confirm or correct a system's idea of the time, by making a brief poll of several independent sites on the network. This protocol may be used either above the Transmission Control Protocol (TCP) or above the User Datagram Protocol (UDP). When used via TCP the time service works as follows: S: Listen on port 37 (45 octal). U: Connect to port 37. S: Send the time as a 32 bit binary number. U: Receive the time. U: Close the connection. S: Close the connection. The server listens for a connection on port 37. When the connection is established, the server returns a 32-bit time value and closes the connection. If the server is unable to determine the time at its site, it should either refuse the connection or close it without sending anything. When used via UDP the time service works as follows: S: Listen on port 37 (45 octal). U: Send an empty datagram to port 37. S: Receive the empty datagram. S: Send a datagram containing the time as a 32 bit binary number. U: Receive the time datagram. The server listens for a datagram on port 37. When a datagram arrives, the server returns a datagram containing the 32-bit time value. If the server is unable to determine the time at its site, it should discard the arriving datagram and make no reply. The Time The time is the number of seconds since 00:00 (midnight) 1 January 1900 UTC, such that the time 1 is 12:00:01 am on 1 January 1900 UTC; this base will serve until the year 2036. For example: the time 2,208,988,800 corresponds to 00:00 1 Jan 1970 UTC, 2,398,291,200 corresponds to 00:00 1 Jan 1976 UTC, 2,524,521,600 corresponds to 00:00 1 Jan 1980 UTC, 2,629,584,000 corresponds to 00:00 1 May 1983 UTC, and -1,297,728,000 corresponds to 00:00 17 Nov 1858 UTC. ═══ 5.2. U.S. Naval Observatory ═══ The U.S. Naval Observatory has established two new network time servers for reliable, accurate time over the Internet and Milnet WANS: tick.usno.navy.mil 192.5.41.40 tock.usno.navy.mil 192.5.41.41 These HP9000/747i systems host Datum VME synchronized generators using IRIG-b timecode from USNO Master Clock #2. The system clocks of these servers are synchronized to within a few tens of microseconds of USNO Master Clock 2. UTC(USNO) is provided over the network via a number of protocols. At present, access is unrestricted. ═══ 5.3. National Institute of Standards and Technology ═══ NIST (National Institute of Standards and Technology) provides time service at time.nist.gov (132.163.135.130). The NIST Network Time Server is synchronized to the NIST cesium clock ensemble. The server transmits time using three common internet protocols: tcp/ip, udp/ip and NTP (Network Time Protocol). ═══ 5.4. Universal Time, Coordinated ═══ This is also known as GMT (Greenwich Mean Time) and Zulu (Zero) time. UTC is an international standard for reporting time. The zero meridian crosses Greenwich, England, home of the Royal Observatory. ═══ 6. Time Server ═══ A Time Server capability is included in the program. When enabled, the program will provide time service to other systems. The server also provides the ability to log the client requests, so that you can check that your time distribution is working. This facility allows the clients on a LAN to stay on a common time basis even if isolated from a precise time source. For testing the time server, run the ifconfig utility, setting up the loopback interface. Open an OS/2 command window. Run the command: ifconfig lo 127.0.0.1 Now, start TIME868. Set one of the custom entries to an IP address of 127.0.0.1 and enable the server. Set the server to log clients. Press "Run now" and you will see the client get the time from the server. ═══ 7. Setup ═══ Before starting to use the program, check to see that your TZ environment variable is set correctly for your local time zone. If you change your config.sys, you will need to shutdown and re-boot for the change to be effective. Also check to see if your clock is somewhat close to the correct time. If your clock is more than 4-5 minutes slow, the first correction may trick your dialer into thinking that the idle time has exceeded its limit and disconnect you. If this happens, just reconnect. The first correction has already been made and the next try will cause no problems. The program will NOT adjust for large (greater than about 90 minutes) differences between the current time and the server time. The reason is that sometimes (very rarely) a server will malfunction and give a wrong time value. To prevent damage to your system should this occur, the program will not make a large change to your time. Choose a time server site from those listed or identify one better for you . The Auto-run feature was designed for those of us who are only connected to the Internet once or twice a day. When this feature is selected, the program will wait for the specified delay, then get the time and exit. (If you enable the server feature, the program will not automatically exit.) The initial delay should be set just long enough for the initial burst of network traffic (the newsreader starting, etc) to settle down. If TIME868 is competing with everything else for your PPP or SLIP link, the delays may be too long for accurate time collection. If you have a permanent connection to the Internet or to a time-server on a LAN, you may wish to keep the program running and use the Continuous running feature to check the time periodically. Once or twice a day should be all that is necessary. If you are running the server, you will want to keep the program continuously running. After you are comfortable with the operation, you may wish the program to start minimized. The program will run fine while minimized, it just won't be taking up screen space. New for SLIP/PPP connections: Select Auto-run and Start Minimized. Then drag TIME868 into your Startup Folder. Now, whenever you start your system, TIME868 will automatically start running. Then, when you log into your Internet Service Provider, TIME868 will sense the connection, set the clock, and exit. ═══ 8. Registering the program ═══ TIME868 is free. But a picture postcard or an email note is appreciated. If you are using TIME868 for multiple systems, please let me know how many. Norbert Dey PO Box 103 Newberg OR 97132 USA Bug reports and suggestions may be sent to dey@teleport.com Thank you, Norbert Dey DISCLAIMER The author of this program accepts no responsibility for damages that are caused by this program and make NO WARRANTY or representation, either express or implied, with respect to this software. This software is provided "AS IS," and you assume the entire risk when you use it. ═══ 9. Changes in version 2 (time868b.zip). ═══ Fixed minimize to desktop. (Minimize to viewer was working fine.) Added program to window switch list. Added more information about setting the TZ Added retry option and counter. The format of the configuration file has changed and been renamed to TIME868.CFG. Added log file option. Added ability to edit name for custom sites (or the name of any site for that matter.) Added Time server capabilities. ═══ 10. Changes in version 3(time868c.zip). ═══ Under some circumstances, the icon would be lost. Under other circumstances, the icon would appear merged with part of the screen when minimized to the desktop. These appear to be fixed. Added a switch ... -h ... to send zero length packets as the request packet. One implementation of the Time Protocol expects zero length. Increased length of hostname variable to 63 bytes. ═══ 11. Changes in version 4 (time868d.zip). ═══ Added more information to this help file. If TIME868 was started from the Startup Folder, it would often exit before a SLIP/PPP connection was made. A Persisent retry option has been added so that a valid TCP/IP connection must be made before the time sample is complete. This means that you can now use the Startup Folder in a very natural way. Select Auto-run, Persistent retry and Start Minimized. Drag TIME868 into your Startup Folder. Now, whenever you start your system, TIME868 will automatically start running. Then, when you log into your Internet Service Provider, TIME868 will sense the connection, set the clock, and exit. ═══ 12. Changes in version 5 (time868e.zip). ═══ Fixed the server. I was in too much of a hurry. I know better. ═══ ═══ A symbol that shows that a choice is currently active.